package com.yuezhu.versionup;

/**
 * 创建一个下载信息的实体类
 */
public class DownloadInfoTask {
	private int threadId;// 下载器id
	private int startPos;// 每个线程开始点
	private int endPos;// 每个线程结束点
	private int compeleteSize;// 每个线程完成度
	private String taskId;  //下载任务的唯一标识，以免与其他任务混淆
	private String url;// 下载器网络标识
	private String localFullPath;// 保存到本地的路径

	public DownloadInfoTask(int threadId, int startPos, int endPos,
							int compeleteSize, String taskId, String url, String localFullPath) {
		this.threadId = threadId;
		this.startPos = startPos;
		this.endPos = endPos;
		this.compeleteSize = compeleteSize;
		this.taskId = taskId;
		this.url = url;
		this.localFullPath = localFullPath;
	}

	public DownloadInfoTask() {
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public int getThreadId() {
		return threadId;
	}

	public void setThreadId(int threadId) {
		this.threadId = threadId;
	}

	public int getStartPos() {
		return startPos;
	}

	public void setStartPos(int startPos) {
		this.startPos = startPos;
	}

	public int getEndPos() {
		return endPos;
	}

	public void setEndPos(int endPos) {
		this.endPos = endPos;
	}

	public int getCompeleteSize() {
		return compeleteSize;
	}

	public void setCompeleteSize(int compeleteSize) {
		this.compeleteSize = compeleteSize;
	}

	@Override
	public String toString() {
		return "DownloadInfo [threadId=" + threadId + ", startPos=" + startPos
				+ ", endPos=" + endPos + ", compeleteSize=" + compeleteSize
				+ "]";
	}

	public String getLocalFullPath() {
		return localFullPath;
	}

	public void setLocalFullPath(String localFullPath) {
		this.localFullPath = localFullPath;
	}

	public String getTaskId() {
		return taskId;
	}

	public void setTaskId(String taskId) {
		this.taskId = taskId;
	}
}